console.log(Buffer);
const buf1 = Buffer.alloc(10,'北京欢迎您')
console.log(buf1);//<Buffer e5 8c 97 e4 ba ac e6 ac a2 e8>

const buf2 = Buffer.allocUnsafe(10,'千里孤坟，无处话凄凉');
console.log(buf2);
console.log(buf2.toString());

const buf3 = Buffer.from('十年生死两茫茫！！','utf-8')
console.log(buf3);
console.log(buf3.toString());